/***
 * formSize(String):表单大小 small mini large
 * type(String):表单类型 text | select | date | checkbox | radio
 * inputType(String):input类型
 * label(String):字段名称
 * labelWidth(String):字段宽度 150px
 * placeholder(String):默认显示
 * isReadOnly(Bollean):是否只读
 * isDisabled(Bollean):是否禁止
 * ifCanChecked(Bollean):下拉框的option是否禁止
 * isRequired(Bollean):是否必填
 * unit(String):单位
 * optionList(Array):如果是下拉，复选，单选的数据源
 * keyName(String):有数据源的情况下，绑定的key字段名
 * valName(String):有数据源的情况下，绑定的label字段名
 * maxlength(Number):最大输入长度
 * colSpan(Number):占位符
 * isAppendRightBtn(Boolean):是否显示input右侧的按钮类型
 * appendRightBtnType(String):input右侧的按钮类型
 * appendRightBtnTxt(String):input右侧的按钮文字
 * bindFieldName(String):绑定后段字段名称
 * bindFieldVal(String):双向绑定绑定的具体值，一般用于readonly或者disabled的情况下直接赋值
 * buttonTxt(String):type为button时的按钮内容文字
 * influenceFiledName(String):二级联动赋值数据源所关联的select的后端字段->bindFieldName
 */

//非支出合同基本信息
const baseInfoFiledList = [{
    type: 'select',
    label: '项目名称',
    placeholder: '请选择',
    isRequired: true,
    optionList: [],
    keyName: 'primaryKey',
    valName: 'name',
    bindFieldName: 'projectKey',
    labelWidth: "150px",
    bindFieldVal: ""
  },
  {
    type: 'select',
    label: '经办部门',
    placeholder: '请选择',
    isRequired: true,
    optionList: [],
    keyName: 'organizationPrimaryKey',
    valName: 'organizationName',
    bindFieldName: 'orgKey',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '经办人',
    isRequired: true,
    isReadOnly: true,
    bindFieldName: 'applyName',
    placeholder: "系统自动填入",
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '合同名称',
    isRequired: true,
    isReadOnly: false,
    placeholder: "",
    bindFieldName: 'contractName',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '合同编码',
    placeholder: '保存后生成',
    isRequired: false,
    isReadOnly: true,
    bindFieldName: 'contractCode',
  },
  {
    type: 'select',
    label: '合同类型',
    placeholder: '请选择',
    isRequired: true,
    isDisabled: true,
    optionList: [],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'contractType',
  },
  {
    type: 'date',
    label: '合同开始时间',
    placeholder: '请选择',
    isRequired: true,
    colSpan: 8,
    bindFieldName: 'contractBeginDate',
  },
  {
    type: 'date',
    label: '合同结束时间',
    placeholder: '请选择',
    isRequired: true,
    bindFieldName: 'contractEndDate',
  },
  {
    type: 'date',
    label: '合同签约时间',
    placeholder: '请选择',
    isRequired: true,
    bindFieldName: 'contractSignDate',
  },
  {
    type: 'select',
    label: '是否标准合同',
    placeholder: '请选择',
    isRequired: true,
    optionList: [{
      dictKey: '1',
      dictValue: "是"
    }, {
      dictKey: '0',
      dictValue: "否"
    }],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'ifStandardContract',
  },
  {
    type: 'select',
    label: '合同类别',
    placeholder: '请选择',
    isRequired: true,
    optionList: [],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'classification',
    bindFieldVal: ""
  },
  {
    type: 'select',
    label: '关联合同',
    placeholder: '请选择',
    optionList: [],
    keyName: 'primaryKey',
    valName: 'contractName',
    placeholder: '请选择',
    isRequired: false,
    bindFieldName: 'associatedContract',
  },
  {
    type: 'text',
    label: '合同状态',
    isReadOnly: true,
    bindFieldName: 'statusName',
    placeholder: "",
    bindFieldVal: "",
    placeholder: '请输入',
  }
]

//支出合同基本信息
const nopaybaseInfoFiledList = [{
    type: 'select',
    label: '项目名称',
    placeholder: '请选择',
    isRequired: true,
    optionList: [],
    keyName: 'primaryKey',
    valName: 'name',
    bindFieldName: 'projectKey',
    labelWidth: "150px",
    bindFieldVal: ""
  },
  {
    type: 'select',
    label: '申请部门',
    placeholder: '请选择',
    isRequired: true,
    optionList: [],
    keyName: 'organizationPrimaryKey',
    valName: 'organizationName',
    bindFieldName: 'orgKey',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '申请人',
    isRequired: true,
    isReadOnly: true,
    bindFieldName: 'applyName',
    placeholder: "系统自动填入",
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '合同名称',
    isRequired: true,
    bindFieldName: 'contractName',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '合同编码',
    placeholder: '保存后生成',
    isReadOnly: true,
    bindFieldName: 'contractCode',
  },
  // {
  //   type: 'select',
  //   label: '合同类型',
  //   placeholder: '请选择',
  //   isRequired: true,
  //   optionList: [],
  //   keyName: 'dictKey',
  //   valName: 'dictValue',
  //   bindFieldName: 'contractType',
  //   bindFieldVal: ""
  // },
  {
    type: 'select',
    label: '是否是框架合同',
    placeholder: '请选择',
    isRequired: true,
    optionList: [{
      dictKey: '0',
      dictValue: "否"
    }, {
      dictKey: '1',
      dictValue: "是"
    }],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'ifFrameworkContract',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '合同总金额',
    inputType: "number",
    isRequired: true,
    maxlength:20,
    unit: "元",
    bindFieldName: 'contractTotalAmount',
    bindFieldVal: ""
  },
  {
    type: 'date',
    label: '合同开始时间',
    placeholder: '请选择',
    isRequired: true,
    colSpan: 8,
    bindFieldName: 'contractBeginDate',
    bindFieldVal: ""
  },
  {
    type: 'date',
    label: '合同结束时间',
    placeholder: '请选择',
    isRequired: true,
    bindFieldName: 'contractEndDate',
    bindFieldVal: ""
  },
  {
    type: 'select',
    label: '是否标准合同',
    placeholder: '请选择',
    isRequired: true,
    optionList: [{
      dictKey: '1',
      dictValue: "是"
    }, {
      dictKey: '0',
      dictValue: "否"
    }],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'ifStandardContract',
    bindFieldVal: ""
  },
  {
    type: 'select',
    label: '关联合同',
    placeholder: '请选择',
    optionList: [],
    keyName: 'primaryKey',
    valName: 'contractName',
    placeholder: '请选择',
    isRequired: false,
    bindFieldName: 'associatedContract',
  },
  {
    type: 'date',
    label: '保修期截止时间',
    placeholder: '请选择',
    isRequired: true,
    bindFieldName: 'warrantyDeadline',
    bindFieldVal: ""
  }
]

//对方信息
const otherInfoFiledList = [{
    type: 'radio',
    label: '主体形式',
    isRequired: false,
    bindFieldName: 'partnerCategory',
    bindFieldVal: 1,
    optionList: [{
      dictKey: 1,
      dictValue: '企业'
    }, {
      dictKey: 2,
      dictValue: '个人'
    }],
    keyName: 'dictKey',
    valName: 'dictValue',
  },
  {
    type: 'text',
    label: '对方名称',
    isRequired: true,
    bindFieldName: 'partnerName',
    placeholder: "请输入",
    bindFieldVal: "",
    appendRightBtnTxt: "验证",
    isAppendRightBtn: true
  },
  {
    type: 'text',
    label: '付款银行名称',
    isRequired: false,
    bindFieldName: 'paymentBank',
    placeholder: "请输入",
    bindFieldVal: ""
  },{
    type: 'text',
    label: '付款账号',
    isRequired: false,
    bindFieldName: 'paymentAccount',
    placeholder: "请输入",
    bindFieldVal: "",
  }, {
    type: 'text',
    label: '对方负责人',
    bindFieldName: 'partnerManager',
    placeholder: "请输入",
    isRequired: false,
    bindFieldVal: "",
    reasonObj: {
      filedName: "partnerCategory",
      filedVal: "1"
    }
  }, {
    type: 'text',
    label: '负责人手机',
    inputType: "number",
    isRequired: false,
    bindFieldName: 'mobile',
    placeholder: "请输入",
    bindFieldVal: "",
    isRequired: true,
    reasonObj: {
      filedName: "partnerCategory",
      filedVal: "1"
    }
  }, {
    type: 'text',
    label: '手机号码',
    inputType: "number",
    isRequired: false,
    bindFieldName: 'mobile',
    placeholder: "请输入",
    isRequired: true,
    bindFieldVal: "",
    reasonObj: {
      filedName: "partnerCategory",
      filedVal: "2"
    }
  }
]

//个人验证
const personageVerifyList = [{
    type: 'text',
    label: '姓名',
    colSpan: 12,
    isRequired: true,
    bindFieldName: 'xingming',
    labelWidth: "150px",
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '身份证号',
    colSpan: 12,
    isRequired: true,
    bindFieldName: 'shenfenzheng',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '手机号',
    colSpan: 12,
    inputType: "number",
    isRequired: true,
    bindFieldName: 'shoujihao',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '合同名称',
    colSpan: 12,
    isRequired: true,
    bindFieldName: 'hetongmigncheng',
  },
  {
    type: 'select',
    label: '是否黑名单',
    colSpan: 12,
    placeholder: '请选择',
    isRequired: true,
    optionList: [{
      dictKey: '0',
      dictValue: "否"
    }, {
      dictKey: '1',
      dictValue: "是"
    }],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'shifouheimingdan',
  }
]

//企业验证
const groupVerifyList = [{
    type: 'text',
    label: '法定代表人',
    colSpan: 12,
    isRequired: true,
    bindFieldName: 'fadingdaibiaoren',
    labelWidth: "165px",
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '公司地址',
    colSpan: 12,
    isRequired: true,
    bindFieldName: 'gongsidizhi',
    bindFieldVal: ""
  },
  {
    type: 'select',
    label: '企业状态',
    colSpan: 12,
    placeholder: '请选择',
    isRequired: true,
    optionList: [],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'qiyezhuangtai',
  },
  {
    type: 'date',
    label: '成立日期',
    colSpan: 12,
    placeholder: '请选择',
    isRequired: true,
    bindFieldName: 'chengliiriqi',
  },
  {
    type: 'text',
    label: '注册号',
    colSpan: 12,
    isRequired: true,
    bindFieldName: 'zhucehao',
    bindFieldVal: ""
  },
  {
    type: 'text',
    label: '统一社会信用代码',
    colSpan: 12,
    isRequired: true,
    bindFieldName: 'xinyongdiama',
    bindFieldVal: ""
  },
  {
    type: 'select',
    label: '是否黑名单',
    colSpan: 12,
    placeholder: '请选择',
    isRequired: true,
    optionList: [{
      dictKey: '0',
      dictValue: "否"
    }, {
      dictKey: '1',
      dictValue: "是"
    }],
    keyName: 'dictKey',
    valName: 'dictValue',
    bindFieldName: 'shifouheimingdan',
  }
]

export {
  baseInfoFiledList,
  nopaybaseInfoFiledList,
  personageVerifyList,
  groupVerifyList,
  otherInfoFiledList
}
